/**
 * FileName: DoctorController
 * Author:   P
 * Date:     2021/3/17 13:59
 * Description:
 */
package com.hospital.nurse.controller;


import com.hospital.nurse.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/doctor")
@CrossOrigin
public class DoctorController {
    @Autowired
    private DoctorService doctorService;


    @RequestMapping("/findAllDoctor/{did}")
    public Map<String,Object> findAllDoctor(@PathVariable int did){
        Map<String, Object> map = new HashMap<>();
        map.put("doctors",doctorService.findAllDcotor(did));
        return map;
    }

}
